import http from '@/http'
// 菜单相关

// 获取菜单列表
const getMenuList = (params) => {
  return http.get('v1/menus', { params})
}

// 添加菜单
const addMenu = (params) => {
  return http.post('v1/menus', params)
}

// 编辑菜单
const editMenu = (params) => {
  return http.put(`v1/menus/${params.id}`, params)
}

// 删除菜单
const deleteMenu = (id) => {
  return http.delete(`v1/menus/${id}`)
}

export { getMenuList, addMenu, editMenu, deleteMenu }
